<?php 
include('./fun.php');
$conn=my_sql($cfg);
$re=adm_login(['all']);
if($re['err']=='no_login'){die('<script>no_login()</script>');}
if($re['err']!='ok'){die('<hh><b>'.$re['err'].'</b></hh>');}
$adm=$re['adm'];


?>
<style>

</style>
<hh><b>修改密码</b></hh>

<mm>
<box style="width:50%" id="pass_box">
<l><text>原密码：</text><input placeholder="请输入原密码" id="old"></l>
<l><text>新密码：</text><input placeholder="请输入新密码" id="new"></l>
<l><text>确认密码：</text><input placeholder="请输入确认密码" id="pass"></l>
<l><a class="blue" onclick="edit($(this))">确定</a></l>
</box>
</mm>




<script>

function edit(o){
var old=$('#old').val();
if(!old){msg('请输入原密码');return;}
var n=$('#new').val();
if(!n){msg('请输入新密码');return;}
var pass=$('#pass').val();
if(!pass){msg('请输入确认密码');return;}
if(pass != n){msg('确认密码和新密码不一致');return;}
if(!confirm("是否修改密码?")){return;}

post('change_apss',{pass:pass,old:old},'',function(res){
msg('密码修改成功');
main_load();
});

}







</script>